Power loss protection in memory sub-systems

ABSTRACT

Aspects of the present disclosure provide systems and methods for improved power loss protection in a memory sub-system of a device. In particular, a power loss protection component allocates a portion of the memory sub-system to non-volatile memory. Responsive to detecting a trigger event at the device, wherein the trigger event may include asynchronous power loss of the device, the power loss protection component detects data written to a volatile cache of the memory sub-system, retrieves the data from the volatile cache, and writes the data to the portion of the memory sub-system allocated to the non-volatile memory.

PRIORITY APPLICATION

This application is a continuation of U.S. application Ser. No.16/226,282, filed Dec. 19, 2018, which is incorporated herein byreference in its entirety.

TECHNICAL FIELD

Embodiments of the disclosure relate generally to memory sub-systemsand, more specifically, to systems and methods for improved power lossprotection in solid-state drives (SSD).

BACKGROUND

A memory sub-system can be a storage system, such as a SSD, and caninclude one or more memory components that store data. The memorycomponents can be, for example, non-volatile memory components andvolatile memory components. In general, a device or host system canutilize the memory sub-system to store data at the memory components andto retrieve data from the memory components.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will be understood more fully from the detaileddescription given below and from the accompanying drawings of variousembodiments of the disclosure.

FIG. 1 illustrates an example computing environment that includes amemory sub-system, in accordance with some embodiments of the presentdisclosure.

FIG. 2 is a flow diagram of an example method to allocate a portion of amemory sub-system for asynchronous power loss protection, in accordancewith some embodiments of the present disclosure.

FIG. 3 is a flow diagram of an example method to allocate a portion of amemory sub-system for asynchronous power loss protection, in accordancewith some embodiments of the present disclosure.

FIG. 4 is a flow diagram of an example method to allocate a portion of amemory sub-system for asynchronous power loss protection, in accordancewith some embodiments of the present disclosure.

FIG. 5 is a block diagram of an example computer system in whichembodiments of the present disclosure can operate.

DETAILED DESCRIPTION

Aspects of the present disclosure are directed to systems and methodsfor improved power loss protection in a memory sub-system. A memorysub-system is also hereinafter referred to as a “memory device.” Anexample of a memory sub-system is a storage system, such as a SSD. Insome embodiments, the memory sub-system is a hybrid memory/storagesub-system. In general, a host system can utilize a memory sub-systemthat includes one or more memory components. The host system can providedata to be stored at the memory sub-system and can request data to beretrieved from the memory sub-system.

Memory sub-systems have become common components in computer systemsranging from music players to large scale distributed cloud systems tomission-critical on-premise server systems for financial and governmentinstitutions. As the demands and reliance upon these memory sub-systemsincreases, data reliability becomes a critical question. Datareliability is often compromised by the type of errors that occur duringasynchronous power loss during a memory system operation. Such powerfailures are common, and can lead to several non-intuitive behaviors.Asynchronous power loss can include situations where a power loss at thedevice is not preceded by any shutdown operations or notification. Insuch situations, the memory sub-systems of the device is challenged toperform or complete final operations within a very short time window.The failure of these final operations can lead to inflight data and/orinternal system metadata information, such as the location or state ofdata, being lost. Where “data in flight” includes data temporarilybuffered or cached in volatile memory, acknowledged as written back to ahost, but not yet committed to non-volatile memory (e.g.,TLC/QLC/MLC/SLC NAND flash memory. NOR flash memory), as well as datawhich has been passed to a NAND die.

For example, memory sub-systems such as Flash based memory in devicestypically write data in 32KiB chunks. If a 40KiB file is written to theflash device, a flash controller must hold a portion of the 40KiB file(8KiB) in a volatile buffer until the proper conditions occur to writethe remaining portion to a non-volatile memory. Should a sudden powerloss occur before the remaining portion is to be saved from the volatileRAM to a non-volatile memory, the remaining portion (e.g., 8 KB) of thefile will be lost, potentially corrupting the entire file.

Traditional solutions for managing asynchronous power loss in memorysub-systems for devices include modifying the memory sub-system throughthe addition of backup power circuitry, such as in the form ofcapacitors. In such systems, when a device is powered on the capacitorsare charged so that in the event of asynchronous power loss, current isdischarged from the stored energy in the capacitors to provideadditional power to the memory sub-system, therefore allowing the memorysub-system (Controller, DRAM, NV Media) to perform final shut-downoperations in order to avoid loss or corruption of data.

Due to the high cost and design restrictions of integrating larger andlarger capacitors into memory sub-systems of devices in the form ofbackup power circuitry, such solutions are not always feasible.Furthermore, backup power systems such as the ones described above arenot always a reliable solution for asynchronous power loss events,because of the limits in backup energy that the capacitors can actuallystore and discharge, along with slower memory circuits and lessparallelism. As a result, such solutions are often very bare bones tononexistent in memory sub-systems of devices found in the client,consumer, and value enterprise markets.

Another conventional, but even less common solution, for preventing datacorruption or loss in the event of asynchronous data loss at a memorysub-system of a device is the integration of a Non-volatile Dual-InlineMemory Module. or “NVDIMM,” into the memory sub-system. NVDIMM typicallyinclude their own dedicated backup power (batteries), and requiresignificant modifications to motherboards and circuitry of devices inorder to integrate the discrete memory types presented by an NVDIMM.Thus, the integration of NVDIMM into a memory sub-system poses a numberof technical challenges, alongside significant increases in cost. As aresult, NVDIMM may not be an appropriate solution for cost-constrainedoperational profiles (market segments).

Aspects of the present disclosure mitigate the above and otherfundamental tradeoffs by providing systems and methods for improvedpower loss protection in a memory sub-system of a device by speeding theprocedures necessary to protecting the device in such cases. Inparticular, a power loss protection component allocates a portion of thememory sub-system to non-volatile memory, such as NAND flash memory, ormore specifically, a single-level cell (SLC) NAND flash memory.Responsive to detecting a trigger event at the device, wherein thetrigger event can include asynchronous power loss of the device, thepower loss protection component detects data written to a volatile cacheof the memory sub-system, retrieves the data from the volatile cache,and writes the data to the portion of the memory sub-system allocated tothe NAND flash memory. As discussed herein, “data” refers to both hostdata, as well as metadata, where host data includes data received at asystem across an interface to the storage system, and metadata includesstorage system internal metadata generated by the storage system itself,which may indicate information about the status or state of the storagesystem.

According to certain example embodiments, the allocation of the portionof the memory sub-system to non-volatile memory includes performing alatency test (e.g., a performance test), such as a program time test,upon a set of flash blocks that comprise the memory sub-system, rankingthe set of flash blocks based on results of the program time test,identifying the portion of the set of flash blocks based on the ranking,and allocating the portion identified based on the ranking to thenon-volatile memory. In such embodiments, “latency” refers to the amountof time spent waiting for a particular operation to be completed, andmay therefore be described as a program time test. For example, when ablock erase command is sent to the memory sub-system of the device, thedevice must wait for completion of the operation by the memorysub-system before sending the next command. This time is known as “blockerase latency” or tBERS, and is typically on the order of a fewmilliseconds. “Read latency,” or tREAD, is the time (25-50 microseconds)it takes the device to prepare a page of data to be read out afterreceiving a read command for a particular page address at the memorysub-system. Finally, “program latency,” or tPROG, is the period of timethat must be observed by the device (˜2 ms to −20 ms) while the memorysub-system programs a page with data.

By performing the program time test upon the flash blocks of the memorysub-system, the power loss protection component can rank the set offlash blocks based on their corresponding read or write speedperformance, thereby providing an indication of the “fastest”programming blocks from among the set of flash blocks that comprise thememory sub-system. The power loss protection component then selectsthose fastest blocks, and allocate the fastest blocks to non-volatilecache. Thus, by choosing the fastest blocks for non-volatile cache, theamount of time required to move data from the volatile cache of thememory sub-system to the non-volatile cache is minimized, thereforediminishing the need for backup power to complete the operation.

FIG. 1 illustrates an example computing environment 100 that includes amemory sub-system 110, in accordance with some embodiments of thepresent disclosure. The memory sub-system 110 can include media, such asmemory components 112-1 to 112-N. The memory components 112-1 to 112-Ncan be volatile memory components, non-volatile memory components, or acombination of such. In some embodiments, the memory sub-system is astorage system. An example of a storage system is a SSD. In someembodiments, the memory sub-system 110 is a hybrid memory/storagesub-system. In general, the computing environment 100 can include a hostsystem 120 that uses the memory sub-system 110. For example, the hostsystem 120 can write data to the memory sub-system 110 and read datafrom the memory sub-system 110.

The host system 120 can be a computing device such as a desktopcomputer, laptop computer, network server, mobile device, or suchcomputing device that includes a memory and a processing device. Thehost system 120 can include or be coupled to the memory sub-system 110so that the host system 120 can read data from or write data to thememory sub-system 110. The host system 120 can be coupled to the memorysub-system 110 via a physical host interface. As used herein, “coupledto” generally refers to a connection between components, which can be anindirect communicative connection or direct communicative connection(e.g., without intervening components), whether wired or wireless,including connections such as electrical, optical, magnetic, etc.Examples of a physical host interface include, but are not limited to, aserial advanced technology attachment (SATA) interface, a peripheralcomponent interconnect express (PCIe) interface, universal serial bus(USB) interface, Fibre Channel. Serial Attached SCSI (SAS), etc. Thephysical host interface can be used to transmit data between the hostsystem 120 and the memory sub-system 110. The host system 120 canfurther utilize an NVM Express (NVMe) interface to access the memorycomponents 112-1 to 112-N when the memory sub-system 110 is coupled withthe host system 120 by the PCIe interface. The physical host interfacecan provide an interface for passing control, address, data, and othersignals between the memory sub-system 110 and the host system 120.

The memory components 112-1 to 112-N can include any combination of thedifferent types of non-volatile memory components and/or volatile memorycomponents. An example of non-volatile memory components includesinverted- and (NAND) type flash memory. Each of the memory components112-1 to 112-N can include one or more arrays of memory cells such assingle level cells (SLCs) or multi-level cells (MLCs) (e.g., triplelevel cells (TLCs) or quad-level cells (QLCs)). In some embodiments, aparticular memory component can include both an SLC portion and a MLCportion of memory cells, wherein each NAND erase block may be put intoany mode, including SLC, MLC, TLC, and QLC. Each of the memory cells canstore one or more bits of data (e.g., data blocks) used by the hostsystem 120. Although non-volatile memory components such as NAND typeflash memory are described, the memory components 112-1 to 112-N can bebased on any other type of memory such as a volatile memory. In someembodiments, the memory components 112-1 to 112-N can be, but are notlimited to, random access memory (RAM), read-only memory (ROM), dynamicrandom access memory (DRAM), synchronous dynamic random access memory(SDRAM), phase change memory (PCM), resistive random access memory(RRAM), magnetic random access memory (MRAM—both toggle and spintransfer torque types), negative-or (NOR) flash memory, electricallyerasable programmable read-only memory (EEPROM), and a cross-point, or3d cross-point array (3DXP) of non-volatile memory cells. A cross-pointarray of non-volatile memory can perform bit storage based on a changeof bulk resistance, in conjunction with a stackable cross-gridded dataaccess array. Additionally, in contrast to many flash-based memories,cross-point non-volatile memory (as well as RRAM. MRAM) can perform awrite in-place operation, where a non-volatile memory cell can beprogrammed without the non-volatile memory cell being previously erased.Furthermore, as noted above, the memory cells of the memory components112-1 to 112-N can be grouped as data blocks that can refer to a unit ofthe memory component used to store data.

A memory sub-system controller 115 (hereinafter referred to as“controller”) can communicate with the memory components 112-1 to 112-Nto perform operations such as reading data, writing data, or erasingdata at the memory components 112-1 to 112-N and other such operations.The controller 115 can include hardware such as one or more integratedcircuits and/or discrete components, a buffer memory, or a combinationthereof. The controller 115 can be a microcontroller, special purposelogic circuitry (e.g., a field programmable gate array (FPGA), anapplication specific integrated circuit (ASIC), etc.), or other suitableprocessor. The controller 115 can include a processor (processingdevice) 117 configured to execute instructions stored in local memory119. In the illustrated example, the local memory 119 of the controller115 includes an embedded memory configured to store instructions forperforming various processes, operations, logic flows, and routines thatcontrol operation of the memory sub-system 110, including handlingcommunications between the memory sub-system 110 and the host system120. In some embodiments, the local memory 119 can include memoryregisters storing memory pointers, fetched data, etc. The local memory119 can also include read-only memory (ROM) for storing micro-code.While the example memory sub-system 110 in FIG. 1 has been illustratedas including the controller 115, in another embodiment of the presentdisclosure, a memory sub-system 110 may not include a controller 115,and instead relies upon external control (e.g., provided by an externalhost, or by a processor or controller separate from the memorysub-system).

In general, the controller 115 can receive commands or operations fromthe host system 120 and can convert the commands or operations intoinstructions or appropriate commands to achieve the desired access tothe memory components 112-1 to 112-N. The controller 115 can beresponsible for other operations such as wear leveling operations,garbage collection operations, error detection and error-correcting code(ECC) operations, encryption operations, caching operations, and addresstranslations between a logical block address and a physical blockaddress that are associated with the memory components 112-1 to 112-N.The controller 115 can further include host interface circuitry tocommunicate with the host system 120 via the physical host interface.The host interface circuitry can convert the commands received from thehost system into command instructions to access the memory components112-1 to 112-N as well as convert responses associated with the memorycomponents 112-1 to 112-N into information for the host system 120.

The memory sub-system 110 can also include additional circuitry orcomponents that are not illustrated. In some embodiments, the memorysub-system 110 can include a cache or buffer (e.g., DRAM) and addresscircuitry (e.g., a row decoder and a column decoder) that can receive anaddress from the controller 115 and decode the address to access thememory components 112-1 to 112-N.

The memory sub-system 110 includes a power loss protection subsystem 113that allocates portions of the memory components 112-1 to 112-N tonon-volatile memory, such as NAND memory, or more specifically, assingle-level cell (SLC) write cache. In some embodiments, the controller115 includes at least a portion of the power loss protection subsystem113. For example, the controller 115 can include a processor 117(processing device) configured to execute instructions stored in localmemory 119 for performing the operations described herein. In someembodiments, the power loss protection subsystem 113 is part of the hostsystem 110, an application, or an operating system.

The power loss protection subsystem 113 handles the allocation ofportions of memory components to volatile and non-volatile memory basedon one or more latency tests performed upon the memory components 112-1to 112-N. The power loss protection subsystem 113 includes (or is incommunication with) one or more supplemental components to performlatency tests upon the memory components 112-1 to 112-N in order todetermine a performance of the memory components (e.g., a tPROG speed),and to rank the memory components 112-1 to 112-N based on theircorresponding performance. Based on the ranking, the power lossprotection subsystem 113 identifies a portion of the memory components112-1 to 112-N (e.g., the fastest memory components from among thememory components 112-1 to 112-N), and allocates the fastest portion tonon-volatile memory. Further details with regards to the operations ofthe power loss protection subsystem 113 are described below.

FIG. 2 is a flow diagram of an example method 200 to allocate a portionof a memory sub-system for asynchronous power loss protection, inaccordance with some embodiments of the present disclosure. The method200 can be performed by processing logic that can include hardware(e.g., processing device, circuitry, dedicated logic, programmablelogic, microcode, hardware of a device, integrated circuit, etc.),software (e.g., instructions run or executed on a processing device), ora combination thereof. In some embodiments, the method 200 is performedby the power loss protection subsystem 113 of FIG. 1. Although shown ina particular sequence or order, unless otherwise specified, the order ofthe processes can be modified. Thus, the illustrated embodiments shouldbe understood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

At operation 205, the power loss protection subsystem 113 allocates aportion of the memory components 112-1 to 112-N to non-volatile memory,while another portion of the memory components 112-1 to 112-N remainsallocated to a volatile cache. Further details regarding the allocationof the portion of the memory components 112-1 to 112-N are discussedwith reference to FIG. 3.

For example, in some embodiments, the portion of the memory components112-1 to 112-N allocated by the power loss protection subsystem 113 tonon-volatile memory can be allocated to NAND flash memory, or morespecifically, to SLC NAND flash memory. While SLC NAND flash memory canhave some compromises compared to other options (e.g., multi-levelcell), SLC NAND flash memory provides the advantage of accuracy,reliability, and most importantly, speed.

At operation 210, the controller 115 receives a command (e.g., from thehost system 120), and converts the command to operations orinstructions. The operations or instructions cause the memory sub-system110 to store data within the portion of the memory components 112-1 to112-N to the volatile cache.

At operation 215, the power loss protection subsystem 113 detects atrigger event. For example, the trigger event can include asynchronouspower loss to the memory sub-system 110, or to a device in communicationwith the memory sub-system 110.

Responsive to the power loss protection subsystem 113 detecting thetrigger event, at operation 220, the power loss protection subsystem 113causes the memory sub-system 110 to access the data written to theportion of the memory components 112-1 to 112-N allocated to thevolatile cache, and at operation 225, causes the memory sub-system 110to write the data to the portion of the memory components 112-1 to 112-Nallocated to non-volatile memory, and more specifically, to the SLC NANDmemory.

Thus, by allocating a portion of the memory components to the “highestperformance” SLC NAND memory, the amount of time (and likewise current)required to move the data from volatile to non-volatile memory is bereduced.

FIG. 3 is a flow diagram of an example method 300 to allocate a portionof a memory sub-system for asynchronous power loss protection, inaccordance with some embodiments of the present disclosure. The method300 can be performed by processing logic that can include hardware(e.g., processing device, circuitry, dedicated logic, programmablelogic, microcode, hardware of a device, integrated circuit, etc.),software (e.g., instructions run or executed on a processing device), ora combination thereof. In some embodiments, the method 300 is performedby the power loss protection subsystem 113 of FIG. 1. Although shown ina particular sequence or order, unless otherwise specified, the order ofthe processes can be modified. Thus, the illustrated embodiments shouldbe understood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

At operation 305, the power loss protection subsystem 113 performs alatency test upon the memory components 112-1 to 112-N. In someembodiments the memory components 112-1 to 112-N comprise a set of flashblocks, and the program time test performed by the power loss protectionsubsystem 113 includes a latency test that determines a program latency(tPROG), block erase latency (tBERS), or read latency (tR) of each flashblock from among the set of flash blocks. By performing the program timetest upon the memory components 112-1 to 112-N, the power lossprotection subsystem 113 determines corresponding performances of eachmemory component in order to identify the “highest performance” memorycomponents from among the memory components 112-1 to 112-N.

At operation 310, the power loss protection subsystem 113 ranks thememory components 112-1 to 112-N based on their correspondingperformance on the program time test, such that the highest rankedmemory components have the lowest read or write speeds (i.e., tPROG,tBERS, or tR), are therefore the fastest. By doing so, at operation 315,the power loss protection component identifies the highest performanceportion from among the memory components 112-1 to 112-N. For example,the power loss protection components can identify the fastest 10%, orfastest gigabyte of memory components from among the memory components112-1 to 112-N.

At operation 320, the power loss protection subsystem 113 allocates theportion of the memory components 112-1 to 112-N identified based on theranking to non-volatile memory. In some embodiments, the non-volatilememory can include NAND flash memory, or SLC NAND flash memory.

FIG. 4 is a flow diagram of an example method 400 to allocate a portionof a memory sub-system for asynchronous power loss protection, inaccordance with some embodiments of the present disclosure. The method400 can be performed by processing logic that can include hardware(e.g., processing device, circuitry, dedicated logic, programmablelogic, microcode, hardware of a device, integrated circuit, etc.),software (e.g., instructions run or executed on a processing device), ora combination thereof. In some embodiments, the method 400 is performedby the power loss protection subsystem 113 of FIG. 1. Although shown ina particular sequence or order, unless otherwise specified, the order ofthe processes can be modified. Thus, the illustrated embodiments shouldbe understood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

As in the method 300 of FIG. 3, at operation 405, the power lossprotection subsystem 113 identifies a subset of the memory components112-1 to 112-N based on the corresponding rankings. For example, thepower loss protection subsystem 113 can identify the top ranked 10%, orother quantity, of memory components from among the memory components112-1 to 112-N.

At operation 410, a first portion of the top ranked memory componentsare allocated to non-volatile memory. For example, in embodiments wherethe top ranked gigabyte of the memory components 112-1 to 112-N areselected, the power loss protection component allocates a first portionof that gigabyte to the non-volatile memory (e.g., 400 megabytes).

At operation 415, the remaining portion of the subset of the memorycomponents 112-1 to 112-N are reserved. For example, in the exampleembodiment discussed in reference to operation 410, the remaining 600megabytes are placed on reserve by the power loss protection subsystem113.

At operation 420, the power loss protection subsystem 113 performs alatency test upon the first portion of the memory components 112-1 to112-N. In some embodiments, the program time test may be performed uponthe memory components 112-1 to 112-N at a predetermined interval (e.g.,every 2 weeks), responsive to a trigger event, such as powering up adevice, or responsive to an explicit or implicit command receive fromthe host system 120.

At operation 425, based on the program time test, the power lossprotection subsystem 113 determines that a performance of the firstportion of the memory components 112-1 to 112-N transgresses a minimumthreshold value. For example, in some embodiments the minimum thresholdvalue defines a minimum performance required of the memory componentsfrom among the memory components 112-1 to 112-N allocated to thenon-volatile memory.

Responsive to determining that the performance of the first portion ofthe memory components 112-1 to 112-N falls below the minimum thresholdvalue, the power loss protection subsystem 113 allocates, or maps, asecond portion from the reserve to non-volatile memory for asynchronouspower loss protection. And unmaps, then retires or reallocates to adifferent function, the first portion that falls below the minimumthreshold value for performance. By doing so, the power loss protectionsubsystem 113 ensures that the fastest and most reliable memorycomponents are utilized for asynchronous power loss protectionthroughout the entire service lifetime of the system.

FIG. 5 illustrates an example machine of a computer system 500 withinwhich a set of instructions, for causing the machine to perform any oneor more of the methodologies discussed herein, can be executed. In someembodiments, the computer system 500 can correspond to a host system(e.g., the host system 120 of FIG. 1) that includes, is coupled to, orutilizes a memory sub-system (e.g., the memory sub-system 110 of FIG. 1)or can be used to perform the operations of a controller (e.g., toexecute an operating system to perform operations corresponding to thepower loss protection subsystem 113 of FIG. 1). In alternativeembodiments, the machine can be connected (e.g., networked) to othermachines in a local area network (LAN), an intranet, an extranet, and/orthe Internet. The machine can operate in the capacity of a server or aclient machine in client-server network environment, as a peer machinein a peer-to-peer (or distributed) network environment, or as a serveror a client machine in a cloud computing infrastructure or environment.

The machine can be a personal computer (PC), a tablet PC, a set-top box(STB), a Personal Digital Assistant (PDA), a cellular telephone, a webappliance, a server, a network router, a switch or bridge, or anymachine capable of executing a set of instructions (sequential orotherwise) that specify actions to be taken by that machine. Further,while a single machine is illustrated, the term “machine” shall also betaken to include any collection of machines that individually or jointlyexecute a set (or multiple sets) of instructions to perform any one ormore of the methodologies discussed herein.

The example computer system 500 includes a processing device 502, a mainmemory 504 (e.g., read-only memory (ROM), flash memory, dynamic randomaccess memory (DRAM) such as synchronous DRAM (SDRAM) or Rambus DRAM(RDRAM), etc.), a static memory 706 (e.g., flash memory, static randomaccess memory (SRAM), etc.), and a data storage system 718, whichcommunicate with each other via a bus 730.

Processing device 502 represents one or more general-purpose processingdevices such as a microprocessor, a central processing unit, or thelike. More particularly, the processing device can be a complexinstruction set computing (CISC) microprocessor, reduced instruction setcomputing (RISC) microprocessor, very long instruction word (VLIW)microprocessor, or a processor implementing other instruction sets, orprocessors implementing a combination of instruction sets. Processingdevice 502 can also be one or more special-purpose processing devicessuch as an ASIC, a FPGA, a digital signal processor (DSP), networkprocessor, or the like. The processing device 502 is configured toexecute instructions 526 for performing the operations and stepsdiscussed herein. The computer system 500 can further include a networkinterface device 508 to communicate over the network 520.

The data storage system 518 can include a machine-readable storagemedium 524 (also known as a computer-readable medium) on which is storedone or more sets of instructions 526 or software embodying any one ormore of the methodologies or functions described herein. Theinstructions 526 can also reside, completely or at least partially,within the main memory 504 and/or within the processing device 502during execution thereof by the computer system 500, the main memory 504and the processing device 502 also constituting machine-readable storagemedia. The machine-readable storage medium 524, data storage system 518,and/or main memory 504 can correspond to the memory sub-system 110 ofFIG. 1.

In one embodiment, the instructions 526 include instructions toimplement functionality corresponding to a memory allocation system(e.g., the power loss protection subsystem 113 of FIG. 1). While themachine-readable storage medium 524 is shown in an example embodiment tobe a single medium, the term “machine-readable storage medium” should betaken to include a single medium or multiple media that store the one ormore sets of instructions. The term “machine-readable storage medium”shall also be taken to include any medium that is capable of storing orencoding a set of instructions for execution by the machine and thatcause the machine to perform any one or more of the methodologies of thepresent disclosure. The term “machine-readable storage medium” shallaccordingly be taken to include, but not be limited to, solid-statememories, optical media, and magnetic media.

Some portions of the preceding detailed descriptions have been presentedin terms of algorithms and symbolic representations of operations ondata bits within a computer memory. These algorithmic descriptions andrepresentations are the ways used by those skilled in the dataprocessing arts to most effectively convey the substance of their workto others skilled in the art. An algorithm is here, and generally,conceived to be a self-consistent sequence of operations leading to adesired result. The operations are those requiring physicalmanipulations of physical quantities. Usually, though not necessarily,these quantities take the form of electrical or magnetic signals capableof being stored, combined, compared, and otherwise manipulated. It hasproven convenient at times, principally for reasons of common usage, torefer to these signals as bits, values, elements, symbols, characters,terms, numbers, or the like.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. The presentdisclosure can refer to the action and processes of a computer system,or similar electronic computing device, that manipulates and transformsdata represented as physical (electronic) quantities within the computersystem's registers and memories into other data similarly represented asphysical quantities within the computer system memories or registers orother such information storage systems.

The present disclosure also relates to an apparatus for performing theoperations herein. This apparatus can be specially constructed for theintended purposes, or it can include a general purpose computerselectively activated or reconfigured by a computer program stored inthe computer. Such a computer program can be stored in a computerreadable storage medium, such as, but not limited to, any type of diskincluding floppy disks, optical disks, CD-ROMs. and magnetic-opticaldisks, read-only memories (ROMs), random access memories (RAMs), EPROMs,EEPROMs, magnetic or optical cards, or any type of media suitable forstoring electronic instructions, each coupled to a computer system bus.

The algorithms and displays presented herein are not inherently relatedto any particular computer or other apparatus. Various general purposesystems can be used with programs in accordance with the teachingsherein, or it can prove convenient to construct a more specializedapparatus to perform the method. The structure for a variety of thesesystems will appear as set forth in the description below. In addition,the present disclosure is not described with reference to any particularprogramming language. It will be appreciated that a variety ofprogramming languages can be used to implement the teachings of thedisclosure as described herein.

The present disclosure can be provided as a computer program product, orsoftware, that can include a machine-readable medium having storedthereon instructions, which can be used to program a computer system (orother electronic devices) to perform a process according to the presentdisclosure. A machine-readable medium includes any mechanism for storinginformation in a form readable by a machine (e.g., a computer). In someembodiments, a machine-readable (e.g., computer-readable) mediumincludes a machine (e.g., a computer) readable storage medium such as aROM, RAM, magnetic disk storage media, optical storage media, flashmemory components, and the like.

In the foregoing specification, embodiments of the disclosure have beendescribed with reference to specific example embodiments thereof. Itwill be evident that various modifications can be made thereto withoutdeparting from the broader scope of embodiments of the disclosure as setforth in the following claims. The specification and drawings are,accordingly, to be regarded in an illustrative sense rather than arestrictive sense.

EXAMPLES

Example 1 is a system comprising: a plurality of memory components; anda processing device, operatively coupled to the plurality of memorycomponents, to: allocating a portion of the plurality of memorycomponents to non-volatile memory, the memory component including avolatile cache; performing a write command of data to the volatilecache; detecting a trigger event at a device associated with theplurality of memory components; retrieving the data written to thevolatile cache responsive to the detecting the trigger event at thedevice; and writing the data to the portion of the plurality of memorycomponents allocated to the non-volatile cache.

In Example 2, the subject matter of Example 1, wherein the trigger eventincludes asynchronous power loss to one or more of the plurality ofmemory components.

In Example 3, the subject matter of any one or more of Examples 1 and 2wherein the plurality of memory components optionally comprise a set offlash blocks, the portion of the plurality of memory componentscomprises a portion of the set of flash blocks, and the allocation theportion of the plurality of memory components to the non-volatile memoryincludes: performing a latency test upon the set of flash blocks;ranking the set of flash blocks based on the latency test; identifyingthe portion of the set of flash blocks based on the ranking; andallocating the portion of the set of flash blocks to the non-volatilememory in response to the identifying the portion of the set of flashblocks based on the ranking.

In Example 4, the subject matter of any one or more of Examples 1through 3, wherein the ranking of the set of flash blocks based on thelatency test includes: determining a tPROG speed of each flash blockfrom among the set of flash blocks; and ranking the set of flash blocksbased on the tPROG speed of each flash block.

In Example 5, the subject matter of any one or more of Examples 1through 3, wherein the portion of the set of flash blocks includes atleast a first block and a second block, and the allocating the portionof the set of flash blocks to the non-volatile memory includes:logically mapping the first block to the second block.

In Example 6, the subject matter of any one or more of Examples 1through 3, wherein the performing the latency test upon the set of flashblocks optionally includes: causing the device to perform the latencytest upon the set of flash blocks.

In Example 7, the subject matter of any one or more of Examples 1through 3, wherein the portion of the set of flash blocks is a firstportion, and the identifying the portion of the set of flash blocksbased on the ranking includes: identifying a subset of the set of flashblocks based on the ranking, the subset of the set of flash blockscomprising at least the first portion and a second portion; allocatingthe first portion of the set of flash blocks to the non-volatile memory;reserving the second portion of the set of flash blocks; performing alatency test upon the first portion of the set of flash blocks;determining a performance of the first portion of the set of flashblocks transgresses a minimum value based on the latency test; andallocating the second portion of the set of flash blocks to thenon-volatile memory responsive to the performance of the first portionof the set of flash blocks transgressing the minimum value.

In Example 8, the subject matter of Example 1, wherein the non-volatilememory comprises NAND flash memory that includes single-level cell NANDflash memory.

Example 9 is a method comprising allocating a portion of a memorycomponent of a device to non-volatile memory, the memory componentincluding a volatile cache; performing a write command of data to thevolatile cache; detecting a trigger event at the device; retrieving thedata written to the volatile cache responsive to the detecting thetrigger event at the device; and writing the data to the portion of thememory component of the device allocated to the non-volatile memory.

In Example 10, the subject matter of Example 9, wherein the triggerevent includes asynchronous power loss at the device.

In Example 11, the subject matter of Example 9, wherein the memorycomponent comprises a set of flash blocks, the portion of the memorycomponent comprises a portion of the set of flash blocks, and theallocation the portion of the memory component to the non-volatilememory includes: performing a latency test upon the set of flash blocksof the memory component; ranking the set of flash blocks based on thelatency test; identifying the portion of the set of flash blocks basedon the ranking; and allocating the portion of the set of flash blocks ofthe memory component to the non-volatile memory in response to theidentifying the portion of the set of flash blocks based on the ranking.

In Example 12, the subject matter of Example 11, wherein the ranking theset of flash blocks based on the latency test includes: determining atPROG speed of each flash block from among the set of flash blocks; andranking the set of flash blocks based on the tPROG speed of each flashblock.

In Example 13, the subject matter of Example 11, wherein the portion ofthe set of flash blocks includes at least a first block and a secondblock, and the allocating the portion of the set of flash blocks to thenon-volatile memory includes: logically mapping the first block to thesecond block.

In Example 14, the subject matter of Example 11, wherein the performingthe latency test upon the set of flash blocks of the memory componentincludes: causing the device to perform the latency test upon the set offlash blocks of the memory component.

In Example 15, the subject matter of Example 11, wherein the portion ofthe set of flash blocks is a first portion, and the identifying theportion of the set of flash blocks based on the ranking includes:identifying a subset of the set of flash blocks based on the ranking,the subset of the set of flash blocks comprising at least the firstportion and a second portion; allocating the first portion of the set offlash blocks to the non-volatile memory: reserving the second portion ofthe set of flash blocks; performing a latency test upon the firstportion of the set of flash blocks; determining a performance of thefirst portion of the set of flash blocks transgresses a minimum valuebased on the latency test; and allocating the second portion of the setof flash blocks to the non-volatile memory responsive to the performanceof the first portion of the set of flash blocks transgressing theminimum value.

In Example 16, the subject matter of Example 9, wherein the non-volatilememory comprises NAND flash memory that includes single-level cell NANDflash memory.

Example 17, A non-transitory computer-readable storage medium comprisinginstructions that, when executed by a processing device, cause theprocessing device to perform operations comprising: allocating a portionof a memory component of a device to non-volatile memory, the memorycomponent including a volatile cache; performing a write command of datato the volatile cache; detecting a trigger event at the device:retrieving the data written to the volatile cache responsive to thedetecting the trigger event at the device; and writing the data to theportion of the memory component of the device allocated to thenon-volatile memory.

In Example 18, the subject matter of Example 17, wherein the triggerevent includes asynchronous power loss at the device.

In Example 19, the subject matter of Example 17, wherein the memorycomponent comprises a set of flash blocks, the portion of the memorycomponent comprises a portion of the set of flash blocks, and theallocation the portion of the memory component to the non-volatilememory includes: performing a latency test upon the set of flash blocksof the memory component; ranking the set of flash blocks based on thelatency test; identifying the portion of the set of flash blocks basedon the ranking; and allocating the portion of the set of flash blocks ofthe memory component to the non-volatile memory in response to theidentifying the portion of the set of flash blocks based on the ranking.

In Example 20, the subject matter of Example 19, wherein the ranking theset of flash blocks based on the latency test includes: determining atPROG speed of each flash block from among the set of flash blocks; andranking the set of flash blocks based on the tPROG speed of each flashblock.

What is claimed is:
 1. A system comprising: a plurality of memorycomponents comprising non-volatile memory components and a volatilecache; and a processing device, operatively coupled with the pluralityof memory components, to perform operations comprising: receiving awrite command to write data to the volatile cache of the plurality ofmemory components; detecting a trigger event at a device associated withthe plurality of memory components; identifying a portion of thenon-volatile memory components based on the trigger event; andallocating the data to the portion of the identified portion of thenon-volatile memory components.
 2. The system of claim 1, wherein theidentifying the portion of the non-volatile memory components comprises:determining a ranking of the portion of the non-volatile memorycomponents; and identifying the portion of the non-volatile memorycomponents based on the ranking.
 3. The system of claim 2, wherein thedetermining the ranking of the portion of the non-volatile memorycomponents comprises: performing a performance test upon thenon-volatile memory components; and determining the ranking of theportion of the non-volatile memory components among the non-volatilememory components based on a result of the performance test.
 4. Thesystem of claim 2, wherein the non-volatile memory components comprise aset of flash blocks, and the identifying the portion of the non-volatilememory components comprises: determining a write time of each flashblock among the set of flash blocks of the non-volatile memorycomponents; ranking the set of flash blocks based on the write time ofeach flash block among the set of flash blocks; and identifying theportion of the non-volatile memory components based on the ranking ofthe set of flash blocks.
 5. The system of claim 1, wherein thenon-volatile memory components comprise NAND flash memory that comprisessingle-level cell NAND flash memory.
 6. The system of claim 1, whereinthe trigger event comprises asynchronous power loss to the system. 7.The system of claim 1, wherein the portion of the non-volatile memorycomponents is a first portion, and the operations further comprise:performing a performance test upon the non-volatile memory components ata predetermined interval; determining a first performance metric of thefirst portion of the non-volatile memory components transgresses aminimum threshold value; identifying a second portion of thenon-volatile memory components based on a second performance metric ofthe second portion of the non-volatile memory components; and allocatingthe data to the second portion of the non-volatile memory components. 8.A method comprising: receiving a write command to write data to thevolatile cache of the plurality of memory components; detecting atrigger event at a device associated with the plurality of memorycomponents; identifying a portion of the non-volatile memory componentsbased on the trigger event; and allocating the data to the portion ofthe identified portion of the non-volatile memory components.
 9. Themethod of claim 8, wherein the identifying the portion of thenon-volatile memory components comprises: determining a ranking of theportion of the non-volatile memory components; and identifying theportion of the non-volatile memory components based on the ranking. 10.The method of claim 9, wherein the determining the ranking of theportion of the non-volatile memory components comprises: performing aperformance test upon the non-volatile memory components; anddetermining the ranking of the portion of the non-volatile memorycomponents among the non-volatile memory components based on a result ofthe performance test.
 11. The method of claim 9, wherein thenon-volatile memory components comprise a set of flash blocks, and theidentifying the portion of the non-volatile memory components comprises:determining a write time of each flash block among the set of flashblocks of the non-volatile memory components; ranking the set of flashblocks based on the write time of each flash block among the set offlash blocks; and identifying the portion of the non-volatile memorycomponents based on the ranking of the set of flash blocks.
 12. Themethod of claim 8, wherein the non-volatile memory components compriseNAND flash memory that comprises single-level cell NAND flash memory.13. The method of claim 8, wherein the trigger event comprisesasynchronous power loss to the system.
 14. The method of claim 8,wherein the portion of the non-volatile memory components is a firstportion, and the operations further comprise: performing a performancetest upon the non-volatile memory components at a predeterminedinterval; determining a first performance metric of the first portion ofthe non-volatile memory components transgresses a minimum thresholdvalue; identifying a second portion of the non-volatile memorycomponents based on a second performance metric of the second portion ofthe non-volatile memory components; and allocating the data to thesecond portion of the non-volatile memory components.
 15. Anon-transitory computer-readable storage medium comprising instructionsthat, when executed by a processing device, cause the processing deviceto: receive a write command to write data to the volatile cache of theplurality of memory components; detect a trigger event at a deviceassociated with the plurality of memory components; identifying aportion of the non-volatile memory components based on the triggerevent; and allocate the data to the portion of the identified portion ofthe non-volatile memory components.
 16. The non-transitorymachine-readable storage medium of claim 15, wherein the identifying theportion of the non-volatile memory components comprises: determining aranking of the portion of the non-volatile memory components; andidentifying the portion of the non-volatile memory components based onthe ranking.
 17. The non-transitory machine-readable storage medium ofclaim 16, wherein the determining the ranking of the portion of thenon-volatile memory components comprises: performing a performance testupon the non-volatile memory components; and determining the ranking ofthe portion of the non-volatile memory components among the non-volatilememory components based on a result of the performance test.
 18. Thenon-transitory machine-readable storage medium of claim 16, wherein thenon-volatile memory components comprise a set of flash blocks, and theidentifying the portion of the non-volatile memory components comprises:determining a write time of each flash block among the set of flashblocks of the non-volatile memory components; ranking the set of flashblocks based on the write time of each flash block among the set offlash blocks; and identifying the portion of the non-volatile memorycomponents based on the ranking of the set of flash blocks.
 19. Thenon-transitory machine-readable storage medium of claim 15, wherein thenon-volatile memory components comprise NAND flash memory that comprisessingle-level cell NAND flash memory.
 20. The non-transitorymachine-readable storage medium of claim 15, wherein the trigger eventcomprises asynchronous power loss to the system.